<template>
  <div id="app" :class="isDarkTheme?'lightTheme':''">
    <router-view/>
  </div>
</template>

<script>
import { mapGetters, mapMutations } from 'vuex'
export default {
  name: 'App',
  data() {
    return {}
  },
  computed: {
    ...mapGetters({ userInfo: 'getUserInfo', isDarkTheme: 'getisDarkTheme'})
  },
  watch: {
    isDarkTheme(newValue, oldValue) {
      // 判断当前用户，设置主题为白色
      var color = this.isDarkTheme? '#070765':'#25262E'
      document.body.style.backgroundColor = color;
    }
  }
}
</script>

<style lang="less">
@topic0-color: #070765; //  #070765
@topic1-color: #fff; // #000
#app {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  user-select:none;
}
.lightTheme {
  .footer,.mainBody,.mainTerm,.el-table th.el-table__cell { background-color: @topic0-color; color: @topic1-color; }
  .el-tree,.headerBox,.el-table__row:nth-of-type(odd) { background: @topic0-color;}
  // .el-table th{ border-right: 7px solid @topic0-color; }
  // .el-table td { color: @topic1-color; }
  // .excelName { color: @topic1-color !important; }
  // .el-tabs__item { color: @topic1-color;}
  .el-select .el-input__inner { background-color: @topic0-color; color: @topic1-color;}
  // .el-table__body .el-table__row td:nth-child(2) div { color:@topic1-color; }
  // .el-tree>.is-focusable>.el-tree-node__content>.el-tree-node__label { color: @topic1-color; }
}
</style>
